<!doctype html> 
<html ng-app='text'> 
<head> 
    <meta charset="utf-8"> 
    <title></title>
    <script type="text/javascript" src='angular.js'></script> 
    <script type="text/javascript">
    var app = angular.module('text',[]);
	app.filter('wangyuechao',function (){
		return function (value,name){
			if(name!=undefined){
				return value + 15;
			}
			else{
				return value + 5;
			}
			
		}
	})
    app.controller('const1',function ($scope){

    	
    	$scope.arr = [12,5,29];
    });
    </script>
</head>
<body ng-controller='const1'>
<div ng-repeat='i in arr'>{{i|wangyuechao}}</div>

</body>
</html>